import fs from 'fs';

function readJson(filePath: string) {
    try {
        return JSON.parse(fs.readFileSync(filePath, 'utf8'));
    } catch (e: any) {
        console.log('工具库 readJson 读取 json 文件失败', filePath, e.message);
        return null;
    }
}

export default readJson;